package com.ruoyi.project.purchase.service;

import java.util.List;

import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.domain.ResultBean;
import com.ruoyi.project.purchase.domain.RyDepotDetail;
import com.ruoyi.project.purchase.domain.RyDepotHead;
import com.ruoyi.project.purchase.domain.pojo.DepotDetailBean;
import com.ruoyi.project.purchase.domain.pojo.DepotHeadItem;
import com.ruoyi.project.purchase.domain.pojo.ParamBean;
import com.ruoyi.project.warehouse.domain.RyDepotItem;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 单据主表Service接口
 *
 * @author you
 * @date 2022-09-22
 */
public interface IRyDepotHeadService
{
    /**
     * 查询单据主表
     *
     * @param id 单据主表主键
     * @return 单据主表
     */
    public RyDepotHead selectRyDepotHeadById(Long id);

    /**
     * 查询单据主表及子表信息
     *
     * @param id 单据主表主键
     * @return 单据主表及子表信息
     */
    public DepotHeadItem selectRyDepotDetailByDepotId(Long id);

    /**
     * 查询可以生成订单的项目明细数据：就是purchase_order_id为空的
     * @param paramBean
     * @return
     */
    public List<RyDepotItem> selectDetailForOrder(ParamBean paramBean);

    /**
     * 新增单据主表及单据子表信息
     */
    public AjaxResult addDepotHeadAndDetail(DepotHeadItem depotHeadItem);

    /**
     * 修改单据主表
     */
    public AjaxResult editDepotHeadAndDetail(DepotHeadItem depotHeadItem);


    /**
     * 查询单据主表列表
     *
     * @param ryDepotHead 单据主表
     * @return 单据主表集合
     */
    public List<RyDepotHead> selectRyDepotHeadList(RyDepotHead ryDepotHead);


    /**
     * 根据条件筛选可关联的项目总清单
     * @param list
     * @return
     */
    public List<RyDepotHead> allUsed(List<Long> list);


    /**
     * 新增单据主表
     *
     * @param ryDepotHead 单据主表
     * @return 结果
     */
    public int insertRyDepotHead(RyDepotHead ryDepotHead);

    /**
     * 修改单据主表
     *
     * @param ryDepotHead 单据主表
     * @return 结果
     */
    public int updateRyDepotHead(RyDepotHead ryDepotHead);

    /**
     * 批量删除单据主表
     *
     * @param ids 需要删除的单据主表主键集合
     * @return 结果
     */
    public int deleteRyDepotHeadByIds(Long[] ids);

    /**
     * 删除单据主表信息
     *
     * @param id 单据主表主键
     * @return 结果
     */
    public int deleteRyDepotHeadById(Long id);
}
